<form class="{$form_class}" method="post" action="{:G::U('search/result')}" >
	<label for="search-key" class="{$search_label_class}">
		<lang>搜索</lang><sup><strong>{if empty($search_type)}{$blog_name}{d*else}{$comment_name}{/if}</strong></sup>
	</label>
	<p class="searchkey">
		<input type="text" id="search-key" name="search_key" prompt="search_key" size="45" maxlength="40" value="" class="{$input_class}" tabindex="1" />
		{script}$('search-key').focus();{/script}
		{if empty($search_type)}
		<select name='search_type' id="search-type" class="{$input_class}" >
			<option value="title"><lang>标题</lang></option>
			<option value="fulltext"><lang>全文</lang></option>
		</select>
		{/if}
		<button type="submit" name="searchsubmit" id="searchsubmit" value="true" prompt="search_submit" class="{$button_class}" ><lang>搜索</lang></button>
		<span onclick="showDiv('search_option')" style="cursor:pointer;" >&nbsp;</span>
		<div class="search-key-about">
			 <lang>关键字中可使用通配符 "*"</lang><br/>
			 <lang>匹配多个关键字全部, 可用空格或 "AND" 连接. 如 blog AND php</lang><br/>
			 <lang>匹配多个关键字其中部分, 可用 "|" 或 "OR" 连接. 如 blog OR php</lang>
		</div>
	 </p>
	 <p>
		<input type="radio" name="search_from" onclick="window.location=('{:G::U('search/index')}')" {if empty($search_type)}checked{/if} id="search-blog" class="{$input_class}" value="blog" /> 
		<label for="search-blog">{$blog_name}</label>
		<input type="radio" name="search_from" onclick="window.location=('{:G::U('search/index?type=comment')}')" {if $search_type=='comment'}checked{/if}	id="search-comment" class="{$input_class}" value="comment" />
		<label for="search-comment">{$comment_name}</label>
	 </p>
	 <div id="search_option" style="display: none;">
		 <hr class="{$hr_line_class}"/>
			 <h4><lang>搜索选项</lang></h4>
			 <table summary="<lang>搜索</lang>" cellspacing="0" cellpadding="0" class="formtable">
				 {if empty($search_type)}
				 <tr>
					 <td><lang>作者</lang></td>
					 <td><input type="text" id="search-name" name="search_name" size="45" maxlength="40" class="{$input_class}" value="" />
						 <div class="search-advance-about"><lang>作者可以为注册用户名或者注册用户ID。</lang></div>
					 </td>
				 </tr>
				 <tr>
					 <td><lang>文章范围</lang></td>
					 <td><label><input type="radio" name="search_filter" value="all" checked="checked" class="{$input_class}" /> <lang>全部文章</lang></label>
						 <label><input type="radio" name="search_filter" value="page" class="{$input_class}" /> <lang>页面日志</lang></label>
						 <label><input type="radio" name="search_filter" value="mobile" class="{$input_class}" /> <lang>手机日志</lang></label>
						 <label><input type="radio" name="search_filter" value="top" class="{$input_class}" /> <lang>置顶日志</lang></label>
					 </td>
				 </tr>
				 <tr>
					 <th><label for="search_date"><lang>搜索时间</lang></label></th>
					 <td><select id="search_date" name="search_date" class="{$input_class}" >
							 <option value="0"><lang>全部时间</lang></option>
							 <option value="86400"><lang>1 天</lang></option>
							 <option value="172800"><lang>2 天</lang></option>
							 <option value="604800"><lang>1 周</lang></option>
							 <option value="2592000"><lang>1 个月</lang></option>
							 <option value="7776000"><lang>3 个月</lang></option>
							 <option value="15552000"><lang>6 个月</lang></option>
							 <option value="31536000"><lang>1 年</lang></option>
							</select>
							<label><input type="radio" name="search_date_before" value="0" checked="checked" class="{$input_class}" /> <lang>以内</lang></label>
							<label><input type="radio" name="search_date_before" value="1" class="{$input_class}" /> <lang>以前</lang></label>
						</td>
				 </tr>
				 <tr>
						<td><label for="search_orderby"><lang>排序类型</lang></label></td>
						<td><select id="search_orderby1" name="search_orderby1" class="{$input_class}" >
								<option value="create_dateline" selected="selected"><lang>发布时间</lang></option>
								<option value="update_dateline"><lang>更新时间</lang></option>
								<option value="commentnum"><lang>评论数量</lang></option>
								<option value="viewnum"><lang>浏览次数</lang></option>
								<option value="trackbacknum"><lang>引用次数</lang></option>
								<option value="uploadnum"><lang>附件数量</lang></option>
								<option value="good"><lang>好评数量</lang></option>
								<option value="bad"><lang>差评数量</lang></option>
							</select>
							<label><input type="radio" name="search_orderby_ascdesc" value="asc"	class="{$input_class}" /> <lang>按升序排列</lang></label>
							<label><input type="radio" name="search_orderby_ascdesc" value="desc" checked="checked" class="{$input_class}" /> <lang>按降序排列</lang></label>
						</td>
					</tr>
					<tr>
						<td valign="top"><label for="search_category"><lang>搜索范围</lang></label></td>
						<td><select id="search-category" name="search_category[]" multiple="multiple" size="10" style="width: 26em;" class="{$input_class}" >
								 <option value="all" selected="selected"><lang>全部版块</lang></option>							 
								 <optgroup label="-- <lang>请选择筛选的分类</lang> --">
								 {~$arrCategory=$oCategoryTree->getChilds()}
								 <foreach for=arrCategory value=nCId>
								 <option value="{$nCId}">{$oCategoryTree:getLayer($nCId, '&nbsp;&nbsp;')}{$oCategoryTree:getValue($nCId)}</option>
								 </foreach>
								 <option value="-1"><lang>未分类</lang></option>
								 </optgroup>
							</select>
						</td>
				</tr>
				{d*else}
				<tr>
					 <td><lang>搜索方式</lang></td>
					 <td><label><input type="radio" name="search_filter" value="name" checked="checked" class="{$input_class}" /><lang>评论名</lang></label>
						 <label><input type="radio" name="search_filter" value="content" class="{$input_class}" /><lang>评论内容</lang></label>
					 </td>
				 </tr>
				{/if}
			</table>
		</div>
	 {if empty($search_type)}
		<hr class="{$hr_line_class}"/>
		<h4><lang>便捷搜索</lang></h4>
		<table cellspacing="4" cellpadding="0" width="100%">
			<tr>
				<td><a href="{:G::U('search/result?search_date=3600&searchsubmit=yes')}"><lang>1 小时以内的日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=14400&searchsubmit=yes')}"><lang>4 小时以内的日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=28800&searchsubmit=yes')}"><lang>8 小时以内的日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=86400&searchsubmit=yes')}"><lang>24 小时以内的日志</lang></a></td>
			</tr>
			<tr>
				<td><a href="{:G::U('search/result?search_date=604800&searchsubmit=yes')}"><lang>1 周内日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=2592000&searchsubmit=yes')}"><lang>1 月内日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=15552000&searchsubmit=yes')}"><lang>6 月内日志</lang></a></td>
				<td><a href="{:G::U('search/result?search_date=31536000&searchsubmit=yes')}"><lang>1 年内日志</lang></a></td>
			</tr>
		</table>
		{/if}
</form>